<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:if test="${dayMenuJson != null}">
{
    "id": ${dayMenuJson.dayMenuId},
    "eatingMenusGroups": [
        <c:forEach var="eatingMenusGroup" items="${dayMenuJson.eatingMenusGroups}" varStatus="st1">
        {
            "type": "<spring:message code="eatingmenu.${eatingMenusGroup.type}"/>",
            "eatingMenus": [
                <c:forEach var="eatingMenu" items="${eatingMenusGroup.eatingMenus}" varStatus="st2">
                {
                    "id": ${eatingMenu.id},
                    "eatingMenuRecipes": [
                        <c:forEach var="eatingMenuRecipe" items="${eatingMenu.eatingMenuRecipes}" varStatus="st3">
                        {
                            "id": ${eatingMenuRecipe.id},
                            "name": "<c:out value="${eatingMenuRecipe.recipe.name}"/>",
                            "count": ${eatingMenuRecipe.count}
                        }<c:if test="${!st3.last}">,</c:if>
                        </c:forEach>
                    ]
                }<c:if test="${!st2.last}">,</c:if>
                </c:forEach>
            ]
        }<c:if test="${!st1.last}">,</c:if>
        </c:forEach>
    ]
}
</c:if>
